import os
import random

a_number = [10,10,20,100,500]
b_number = [4,5,10,101,549,120] 
files = os.listdir('./data')
for i in range(1,6):
    f = open('./data/'+str(i)+'.in','w')
    f.write(str(a_number[i-1]))
    f.write(' ')
    f.write(str(b_number[i-1]))
    f.write('\n')
    for j in range(a_number[i-1]):
        f.write(str(random.randint(0,a_number[i-1])))
        f.write('\n')
    for j in range(b_number[i-1]):
        f.write(str(random.randint(0,b_number[i-1])))
        f.write('\n')
    
    f.close()